package com.qf.common.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by howhow on 2018/6/16.
 */

public class NameUtils {

    /**
     * 判断名字是否为中文，是否包含·或者特殊符号等
     * @param name
     * @return
     */
    public static boolean checkName(String name) {
        Pattern p = Pattern.compile("^[\\u4e00-\\u9fa5]+(·[\\u4e00-\\u9fa5]+)*$");
        Matcher m = p.matcher(name);
        return m.matches();

    }
}
